import request from "@/utils/request"
export function login(data) {
  return request({
    method: 'POST',
    url: '/api/login',
    // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data
  })
}
export function register(data) {
  return request({
    method: 'POST',
    url: '/api/register',
    data
  })
}
export function getUserInfo() {
  return request({
    method: 'GET',
    url: '/my/userinfo'
  })
}
export function updatePwd(data) {
  return request({
    method: 'POST',
    url: '/my/updatepwd',
    data
  })
}
export function getAllUserInfo(identity) {
  return request({
    method: 'GET',
    url: '/my/alluserinfo',
    params: { identity }
  })
}
export function updateUserInfo(data) {
  return request({
    method: 'POST',
    url: '/my/userinfo',
    data
  })
}
export function deleteUser(data) {
  return request({
    method: 'POST',
    url: '/my/deleteuser',
    data
  })
}